﻿<phone:PhoneApplicationPage xmlns:UI="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI" 
    x:Class="Studio77.RuneMaster.Pages.GamePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    xmlns:myView="clr-namespace:Studio77.RuneMaster.Views"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        <Storyboard x:Name="StoryboardShowToolBar">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="toolbar">
                <EasingDoubleKeyFrame KeyTime="0" Value="-80"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardHideToolbar">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="toolbar">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-80">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Style x:Key="ButtonStyle1" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="border" BorderBrush="White" BorderThickness="2" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <CompositeTransform/>
                                </Border.RenderTransform>
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFF17272" Offset="0"/>
                                        <GradientStop Color="#FFDE2A2A" Offset="1"/>
                                        <GradientStop Color="#FF8F3B3B" Offset="0.19"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
                                <ContentPresenter.RenderTransform>
                                    <CompositeTransform/>
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyle2" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="border" BorderBrush="White" BorderThickness="2" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <CompositeTransform/>
                                </Border.RenderTransform>
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFF1EB72" Offset="0"/>
                                        <GradientStop Color="#FF644A03" Offset="1"/>
                                        <GradientStop Color="#FFBB8900" Offset="0.19"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
                                <ContentPresenter.RenderTransform>
                                    <CompositeTransform/>
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Name="StoryboardShowStatus">
            <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="bdrStageStatus" d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <QuinticEase EasingMode="EaseInOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="StoryboardHideStatus">
            <DoubleAnimation Duration="0:0:0.5" To="480" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="bdrStageStatus" d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <QuinticEase EasingMode="EaseInOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Style x:Key="ButtonStyle3" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="#FF8D8D8D" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FF787878" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <ColorAnimation Duration="0" To="#FF767676" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="border" BorderBrush="White" BorderThickness="2" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <CompositeTransform/>
                                </Border.RenderTransform>
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF72F189" Offset="0"/>
                                        <GradientStop Color="#FF036410" Offset="1"/>
                                        <GradientStop Color="#FF05910B" Offset="0.19"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
                                <ContentPresenter.RenderTransform>
                                    <CompositeTransform/>
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyle4" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                            <DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="MouseOver"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="border" BorderBrush="White" BorderThickness="2" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <CompositeTransform/>
                                </Border.RenderTransform>
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF72A6F1" Offset="0"/>
                                        <GradientStop Color="#FF2A63DE" Offset="1"/>
                                        <GradientStop Color="#FF3B5A8F" Offset="0.19"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
                                <ContentPresenter.RenderTransform>
                                    <CompositeTransform/>
                                </ContentPresenter.RenderTransform>
                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Name="StoryboardShowPause">
            <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="bdrPause" d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <QuarticEase EasingMode="EaseInOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="StoryboardHidePause">
            <DoubleAnimation Duration="0:0:0.5" To="-480" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="bdrPause" d:IsOptimized="True"/>
        </Storyboard>
        <Storyboard x:Name="StoryboardShowGameCanvas">
            <DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="gameCanvas" d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <QuinticEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:1" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="gameCanvas" d:IsOptimized="True"/>
        </Storyboard>
        <Storyboard x:Name="StoryboardHideGameCanvas">
            <DoubleAnimation Duration="0:0:1" To="-800" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="gameCanvas" d:IsOptimized="True"/>
            <DoubleAnimation Duration="0:0:1" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="gameCanvas" d:IsOptimized="True"/>
        </Storyboard>
        <Storyboard x:Name="StoryboardShowGamingTip">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="imgGamingTip">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1.3" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardWaring">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="imageWaring">
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <PowerEase EasingMode="EaseInOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseInOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardRearrange">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="gameCanvas">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-800">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuadraticEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="gameCanvas">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuadraticEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Viewbox>
        <Grid x:Name="LayoutRoot" Background="Transparent" Height="800" Width="480">
            <Grid.RowDefinitions>
                <RowDefinition Height="100"/>
                <RowDefinition Height="620"/>
                <RowDefinition Height="80"/>
            </Grid.RowDefinitions>
            <Image Source="/Images/gameback.jpg" Stretch="Fill" Grid.RowSpan="3" Margin="0" d:IsLocked="True"/>
            <myView:TopToolbar x:Name="toolbar" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" d:IsLocked="True">
                <myView:TopToolbar.RenderTransform>
                    <CompositeTransform/>
                </myView:TopToolbar.RenderTransform>
            </myView:TopToolbar>

            <myView:RuneGameCanvas x:Name="gameCanvas" Background="#01FFFFFF" HorizontalAlignment="Right" Height="560" Margin="0,0,20,0" VerticalAlignment="Center" Width="400" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Opacity="0">
                <myView:RuneGameCanvas.RenderTransform>
                    <CompositeTransform TranslateY="-800"/>
                </myView:RuneGameCanvas.RenderTransform>
            </myView:RuneGameCanvas>
            <Grid x:Name="gridTool" Margin="4,190,426,112" Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <myView:ToolItemInGame x:Name="tool4" HorizontalAlignment="Center" Height="50" Grid.Row="3" VerticalAlignment="Center" Width="50"/>
                <myView:ToolItemInGame x:Name="tool3" HorizontalAlignment="Center" Height="50" Grid.Row="2" VerticalAlignment="Center" Width="50"/>
                <myView:ToolItemInGame x:Name="tool2" HorizontalAlignment="Center" Height="50" Grid.Row="1" VerticalAlignment="Center" Width="50"/>
                <myView:ToolItemInGame x:Name="tool1" HorizontalAlignment="Center" Height="50" VerticalAlignment="Center" Width="50"/>
            </Grid>
            <Image x:Name="imageWaring" Grid.RowSpan="3" Source="/Images/waringbg.png" Stretch="Fill" IsHitTestVisible="False" Margin="0" Visibility="Collapsed" Opacity="0"/>
            <Border x:Name="bdrStageStatus" HorizontalAlignment="Center" Height="800" VerticalAlignment="Top" Grid.RowSpan="3" Width="480" Background="#B2000000" RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <CompositeTransform TranslateX="480"/>
                </Border.RenderTransform>
                <Border BorderBrush="White" BorderThickness="1" CornerRadius="5" Background="#B2000000" Width="341" Height="519">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="26*"/>
                            <RowDefinition Height="233*"/>
                        </Grid.RowDefinitions>
                        <TextBlock x:Name="txtStatusStageName" TextWrapping="Wrap" Text="STAGE 1-1" TextAlignment="Center" Foreground="White" FontSize="32" VerticalAlignment="Center" FontFamily="Segoe WP Semibold"/>
                        <Path Data="M17.6667,40 L335.794,40" Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="1" Margin="9.936,0.5,9.936,0" Stretch="Fill" Stroke="#FFC9C9C9" UseLayoutRounding="False" VerticalAlignment="Top" Width="319.128" Grid.Row="1"/>
                        <TextBlock HorizontalAlignment="Left" Margin="16,7,0,0" Grid.Row="1" TextWrapping="Wrap" Text="得分" VerticalAlignment="Top" Foreground="#FF00FF74"/>
                        <TextBlock x:Name="txtScore" HorizontalAlignment="Center" Margin="0,7,0,0" Grid.Row="1" TextWrapping="Wrap" Text="1600" VerticalAlignment="Top" Foreground="#FF00FF74"/>
                        <TextBlock x:Name="txtScoreG" HorizontalAlignment="Right" Margin="0,7,9,0" Grid.Row="1" TextWrapping="Wrap" Text="160 G" VerticalAlignment="Top" Foreground="#FFFFAE00"/>
                        <TextBlock HorizontalAlignment="Left" Margin="16,44,0,0" Grid.Row="1" TextWrapping="Wrap" Text="连击" VerticalAlignment="Top" Foreground="Yellow"/>
                        <TextBlock x:Name="txtCombo" HorizontalAlignment="Center" Margin="0,44,0,0" Grid.Row="1" TextWrapping="Wrap" Text="5" VerticalAlignment="Top" Foreground="Yellow"/>
                        <TextBlock x:Name="txtComboG" HorizontalAlignment="Right" Margin="0,44,9,0" Grid.Row="1" TextWrapping="Wrap" Text="300 G" VerticalAlignment="Top" Foreground="#FFFFAE00"/>
                        <Button Click="btnNext_Click_1" x:Name="btnNext" Content="下一个等级" HorizontalAlignment="Center" Height="41" Margin="0,0,0,20" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Bottom" Width="197" Grid.Row="1" FontSize="21.333"/>
                        <Button Click="btnRetry_Click_1" x:Name="btnRetry" Content="再试一次" HorizontalAlignment="Center" Height="41" Margin="71,0,71,20" Style="{StaticResource ButtonStyle2}" VerticalAlignment="Bottom" Width="197" Grid.Row="1" FontSize="21.333" Visibility="Collapsed"/>
                        <Image x:Name="ImgStatus" Margin="0,242,0,0" Grid.Row="1" Source="/Images/StageSuccess.png" Stretch="None" VerticalAlignment="Top"/>
                        <TextBlock x:Name="txtAddG" HorizontalAlignment="Right" Margin="0,121,9,0" Grid.Row="1" TextWrapping="Wrap" Text="+460 G" VerticalAlignment="Top" Foreground="#FFFFAE00"/>
                        <TextBlock x:Name="txtTotalG" HorizontalAlignment="Right" Margin="0,158,9,0" Grid.Row="1" TextWrapping="Wrap" Text="TOTAL: 103300 G" VerticalAlignment="Top" Foreground="#FFFFAE00"/>
                        <Button Click="btnReturn_Click_1" x:Name="btnReturn" Content="返回菜单" HorizontalAlignment="Center" Height="41" Margin="71,0,71,20" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Bottom" Width="197" Grid.Row="1" FontSize="21.333"/>
                        <TextBlock HorizontalAlignment="Left" Margin="16,82,0,0" Grid.Row="1" TextWrapping="Wrap" Text="剩余精神力" VerticalAlignment="Top" Foreground="#FF00E8FF"/>
                        <TextBlock x:Name="txtSprite" HorizontalAlignment="Center" Margin="0,82,0,0" Grid.Row="1" TextWrapping="Wrap" Text="5" VerticalAlignment="Top" Foreground="#FF00E8FF"/>
                        <TextBlock x:Name="txtSpriteG" HorizontalAlignment="Right" Margin="0,82,9,0" Grid.Row="1" TextWrapping="Wrap" Text="100 G" VerticalAlignment="Top" Foreground="#FFFFAE00"/>
                    </Grid>
                </Border>

            </Border>
            <Border x:Name="bdrPause" HorizontalAlignment="Center" Height="800" VerticalAlignment="Top" Grid.RowSpan="3" Width="480" Background="#99000000" RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <CompositeTransform TranslateX="-482"/>
                </Border.RenderTransform>
                <Border BorderBrush="White" BorderThickness="1" CornerRadius="5" Background="#47000000" Margin="0,240,0,257" HorizontalAlignment="Center" Width="280" Height="290">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="52"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <TextBlock TextWrapping="Wrap" Text="暂停" TextAlignment="Center" Foreground="White" FontSize="32" VerticalAlignment="Center" FontFamily="Segoe WP Semibold"/>
                        <Path Data="M17.6667,40 L335.794,40" Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="1" Margin="9.936,0.5,9.936,0" Stretch="Fill" Stroke="#FFC9C9C9" UseLayoutRounding="False" VerticalAlignment="Top" Width="319.128" Grid.Row="1"/>
                        <StackPanel Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Button Click="btnResume_Click_1" x:Name="btnResume" Content="继续游戏" HorizontalAlignment="Center" Height="41" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="197" FontSize="21.333"/>
                            <Button Click="btnPauseRestart_Click_1" x:Name="btnPauseRestart" Content="重新开始" HorizontalAlignment="Center" Height="41" Style="{StaticResource ButtonStyle3}" VerticalAlignment="Top" Width="197" FontSize="21.333" Margin="0,30,0,0"/>
                            <Button Click="btnReturnToMain_Click_1"  x:Name="btnPauseReturn" Content="主菜单" HorizontalAlignment="Center" Height="41" Style="{StaticResource ButtonStyle4}" VerticalAlignment="Top" Width="197" FontSize="21.333" Margin="0,30,0,0"/>
                        </StackPanel>
                    </Grid>
                </Border>

            </Border>
            <StackPanel Orientation="Vertical" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="42" Margin="8,0,0,0" Height="171">
                <Image x:Name="heart1" Source="/Images/heart (1).png" Stretch="Fill" Height="42" Margin="0,15,0,0"/>
                <Image x:Name="heart2" Source="/Images/heart (1).png" Stretch="Fill" Height="42" Margin="0,15,0,0"/>
                <Image x:Name="heart3" Source="/Images/heart (1).png" Stretch="Fill" Height="42" Margin="0,15,0,0"/>

            </StackPanel>
            <Image x:Name="imgGamingTip" Grid.Row="1" Source="/Images/start.png" Stretch="None" VerticalAlignment="Top" Margin="60,201,0,0" IsHitTestVisible="False" Opacity="0"/>
            <Grid x:Name="gridAd" Margin="0" Grid.Row="2" Background="#4C191919" Width="480" Height="80">
                <!--<my:AdView x:Name="adView1" VerticalAlignment="Top" AdAnimation="AdAnimationFlipFromLeft" AdInterval="30" AdPositionID="90032657" IsDebugMode="True" AdViewEvent="adViwe1Event" AdViewFullscreenEvent="adView1FullscreenEvent" />-->
            	<Image Source="/Images/logo77.png" Stretch="Fill" Width="134" Height="38" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0"/>
                <Image x:Name="imgBanner" Source="/Images/banner1.jpg" Stretch="Fill" Tap="Image_Tap"/>
                <UI:AdControl x:Name="adControlMicrosoft"
                          ApplicationId="6753aea6-e58e-4950-aabc-b262a36b05f3" 
                          AdUnitId="117375" HorizontalAlignment="Left" Height="80" Grid.Row="2" VerticalAlignment="Top" Width="480" ErrorOccurred="adControl_ErrorOccurred" AdRefreshed="adControl_AdRefreshed"  />
                <!--<SmartMad:AdView xmlns:SmartMad="clr-namespace:SmartMad.Ads.WindowsPhone7.WPF;assembly=SmartMad.Ads.WindowsPhone7" 
                    x:Name="adView1"
                    AdPositionID="90032651"
                    AdViewEvent="adView1_AdViewEvent"
    			    AdViewFullscreenEvent="adView1_AdViewFullscreenEvent"
                    AdInterval="30"
                    AdAnimation="AdAnimationRandom"
                    VerticalAlignment="Bottom"
                    IsDebugMode="False" Grid.Row="2"/>-->
                <Grid x:Name="gridMsnAd" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,10" Grid.Row="2" />
                <Grid x:Name="gridSmartAd" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,0" Grid.Row="2" />
            </Grid>
            <Image x:Name="imgQuickStart" Margin="0" Grid.RowSpan="3" Source="/Images/gamequickstart.png" Stretch="Fill" Visibility="Collapsed"/>
        </Grid>

    </Viewbox>

</phone:PhoneApplicationPage>